<html>
<head></head>
<body>
<?php
	echo anchor('user/add_question/'.$survey_id.'/'.$id,'Add a question'); echo "   |   ";
	echo anchor('user/delete_questions/'.$survey_id.'/'.$id,'Delete a Question'); echo "   |   ";
	echo anchor('user/update_questions/'.$survey_id.'/'.$id,'Update a Question');
	echo "<br>";?>

	<?php
		echo form_open('user/questions_to_update/'.$survey_id.'/');
		$index = 0;
		foreach($questions->result() as $toDelete){
			$q_num = $toDelete->question_number;
			$body = $toDelete->body;
			$id = "radEdit".$index;
			//echo "<input type='checkbox' value ='$q_num' name='choice[]' />";
			
			echo "<input type='radio' id=\"$id\" value ='$q_num' name='choice' />";
			echo "<label for=\"$id\">";
			echo " $body";
			echo "<label>";
			echo "<br>";
			$index++;
		}
		if ($questions->num_rows == 0){
		}
		else{
			echo "<input type='submit' name='update' value='Update'>";
		}
	?>

	
</body>
</html>
